import React, { Component } from 'react';
import {
  StyleSheet,
  View
} from 'react-native';
// 导入路由相关的组件
// Router: 就相当于 昨天我们所学的  HashRouter
// Stack: 这是一个分组的容器，他不表示具体的路由，专门用来给路由分组的
// Scene：就表示一个具体的路由规则，好比 昨天学到的 Route
import { Router, Stack, Scene } from 'react-native-router-flux'
import App from './App.js'
import MovieList from './views/Movie/MovieList.js'
import MovieDetail from './views/Movie/MovieDetail.js'
export default class Main extends Component {
  constructor(props){
    super(props)
    this.state = {}
  }
  render(){
    return <Router sceneStyle={{backgroundColor:'#fff'}}>
      <Stack key='root'>
        <Scene key='home' title='首页' component={App} hideNavBar={true}></Scene>
        <Scene key='movielist' title='电影列表' component={MovieList}></Scene>
        <Scene key='moviedetail' title='电影详情' component={MovieDetail}></Scene>
      </Stack>
    </Router>
  }
}